{varType ApiGen\Index\Index $index}
{varType ApiGen\Renderer\Latte\Template\ConfigParameters $config}
{varType ApiGen\Renderer\Latte\Template\LayoutParameters $layout}

{define elementSummaryGroup, string $heading, ApiGen\Info\ElementInfo[] $elements, bool $showDescription = true, bool $onlyPrimary = false}
	{try}
		<tr>
			<th class="table-heading" colspan="2">{$heading}</th>
		</tr>

		{foreach $elements as $element}
			{skipIf $onlyPrimary && !$element->primary}
			{skipIf !elementPageExists($element)}
			<tr>
				<td class="table-cell" colspan="{$showDescription ? 1 : 2}"><a href="{elementUrl($element)}" n:class="$element->isDeprecated() ? deprecated">{elementName($element)}</a></td>
				<td class="table-cell" n:if="$showDescription">{elementShortDescription($index, null, $element)}</td>
			</tr>
		{else}
			{rollback}
		{/foreach}

		<tr>
			<td class="table-spacer" colspan="2"></td>
		</tr>
	{/try}
{/define}
